Optimal. Leaf size=13 \[ \log (1-\cos (x))-\log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0605882, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.417, Rules used = {4392, 2707, 36, 29, 31} \[ \log (1-\cos (x))-\log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4392
Rule 2707
Rule 36
Rule 29
Rule 31
Rubi steps
\begin{align*} \int \frac{\sec (x)}{-\cot (x)+\csc (x)} \, dx &=\int \frac{\tan (x)}{1-\cos (x)} \, dx\\ &=-\operatorname{Subst}\left (\int \frac{1}{x (1+x)} \, dx,x,-\cos (x)\right )\\ &=-\operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,-\cos (x)\right )+\operatorname{Subst}\left (\int \frac{1}{1+x} \, dx,x,-\cos (x)\right )\\ &=\log (1-\cos (x))-\log (\cos (x))\\ \end{align*}
Mathematica [A] time = 0.0098065, size = 25, normalized size = 1.92 \[ 2 \log \left (\sin \left (\frac{x}{2}\right )\right )-\log \left (1-2 \sin ^2\left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.081, size = 6, normalized size = 0.5 \begin{align*} \ln \left ( \sec \left ( x \right ) -1 \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.09332, size = 55, normalized size = 4.23 \begin{align*} -\log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 1\right ) - \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} - 1\right ) + 2 \, \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.479766, size = 54, normalized size = 4.15 \begin{align*} -\log \left (-\cos \left (x\right )\right ) + \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{\sec{\left (x \right )}}{\cot{\left (x \right )} - \csc{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10371, size = 19, normalized size = 1.46 \begin{align*} \log \left (-\cos \left (x\right ) + 1\right ) - \log \left ({\left | \cos \left (x\right ) \right |}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]